extends ../layout

block main
	ul.breadcrumb
		li
			i.icon-home
		li
			i.icon-angle-right
		li
			a(href="/") 面板


	div(class="row-fluid sortable")
		div(class="box span12")
			div(class="box-header", data-original-title)
				h2
					i(class="halflings-icon user")
					span.break
					| 拼单

			div.box-content		
				table(class="table table-striped table-bordered bootstrap-datatable datatable")
					thead
						tr
							th 时间
							th 用户
							th 拼单号
							th 状态
					tbody
						- var states = ["拼单中", "确认中", "付款中", "结算中", "退款中", "已结算", "已取消"]
						- each contract in contracts
							tr
								td= moment(contract.updatedAt).format('LLL')
								td
									a(href="/customers/#{contract.get('customer_id')}", target="_blank") #{contract.get('customer_id')}
								td= contract.id
								td= states[contract.get('state') - 1]